import { defHttp } from "@/utils/http/axios";
import { RoleApi } from "@/enums/apiEnum";
import { Recordable } from "/#/global";

export function getRoles() {
  return defHttp.get({
    url: RoleApi.GetRoles,
  });
}

export function getRoleListByPage(params:Recordable) {
  return defHttp.get({
    url: RoleApi.GetRoleListByPage,
    params
  });
}

export function updateRoleAndMenus(item: Recordable) {
  return defHttp.put({ url: RoleApi.UpdateRoleAndMenus, data: item });
}

export function updateRoleAndApis(item: Recordable) {
  return defHttp.put({ url: RoleApi.UpdateRoleAndApis, data: item });
}
